<template>
	<view class="container">
		<view class="top-wrapper">
			<view class="u-flex u-row-between u-font-32" style="font-weight: bolder;color: white;">
				<view class="u-text-center">
					<view class="">
						{{taskNum.current}}
					</view>
					<view class="">
						今日任务
					</view>
				</view>
				<view class="u-text-center">
					<view class="">
						{{taskNum.connected}}
					</view>
					<view class="">
						已接任务
					</view>
				</view>
				<view class="u-text-center">
					<view class="">
						{{taskNum.refuse}}
					</view>
					<view class="">
						拒绝任务
					</view>
				</view>
			</view>
		</view>
		<scroll-view class="list clearfix" v-if="list.length" refresher-enabled :refresher-triggered="refresh"
			@refresherrefresh="handleRefresh" @scrolltolower="handleReachBottom" refresher-threshold="30" scroll-y>
			<navigator
				:url="item.orderType==11?item.jobType==1?'/subpackage/order/rescueDetail?orderId='+item.orderId:'#':'/subpackage/order/detail?orderId='+item.orderId"
				class="clearfix" hover-class="none" v-for="(item,index) in list" :key="index">
				<view class="items box-shadow u-p-b-16" v-if="item.orderType!=11"
					:style="{'margin-bottom':index==list.length-1?'24rpx':''}">
					<view class="u-flex u-col-center u-row-between">
						<view class=" u-col-top" style="max-width: 78%;">
							<!-- <view class="u-line-1 u-font-32 fw-middel">{{item.beeperName}}</view> -->
							<view class="u-font-md u-m-t-6 color-gary-xs">{{item.createDate}}</view>
						</view>
						<view class="u-text-right">
							<block v-if="item.orderType ==3 && item.timingState ==1">
								<view class="u-font-md u-m-b-12">计时中</view>
							</block>
							<block v-else-if="item.orderState == 13">
								<view class="u-font-md u-m-b-12">已回收</view>
							</block>
							<block v-else-if="item.orderType ==3 && item.timingState ==2">
								<view class="u-font-md u-m-b-12">计时结束</view>
							</block>
							<block v-else-if="item.orderState == 10 && item.timingState ==1">
								<view class="u-font-md u-m-b-12 color-red">计时中</view>
							</block>
							<block v-else-if="item.orderState == 10 && item.timingState ==2">
								<view class="u-font-md u-m-b-12 color-red">待回收</view>
							</block>
							<block v-else-if="item.orderState == 10">
								<view class="u-font-md u-m-b-12 color-red">已到达</view>
							</block>
							<u-tag :text="indexEnum.payStateFillter[item.payState]" type="success"
								border-color="transparent" />
						</view>
					</view>

					<view class="u-flex u-col-center u-m-t-28">
						<scroll-view scroll-x class="u-flex-1  u-m-r-18 scroll"
							style="white-space: nowrap;overflow: hidden;">
							<view class="inline-block item" v-for="(items,indexs) in item.goodsList" :key="indexs">
								<u-image width="100%" height="110rpx" :src="items.images"></u-image>
								<view class=" u-text-center u-font-md u-line-1 u-m-t-6">{{items.name}}</view>
							</view>
						</scroll-view>
						<view class="u-text-center u-p-t-18" style="align-self: flex-start;">
							<view class="u-font-lg">￥{{item.realAmount}}</view>
							<view class="u-font-md">共{{item.goodsList.length}}件</view>
						</view>
					</view>
					<view class="color u-font-24 u-m-t-18">
						<view v-if="item.customerName" class="u-m-b-4">患者姓名: {{item.customerName}}</view>
					</view>
					<view class="color u-font-24 u-m-t-18">
						<view v-if="item.businessName" class="u-m-b-4">店铺: {{item.businessName}}</view>
					</view>

					<view class="color u-font-24 u-m-t-18">
						<view v-if="item.earliestTime&&item.serviceMode!==1" class="u-m-b-4">
							期望送达时间: <span class="exp-time">{{getOptimizeDateTwo(item.earliestTime)}}</span></view>
					</view>
					<view class="u-flex order-operation" v-if="item.orderType!==3">
						<u-button class="u-margin-right-8" size="medium" type="success"
							@click="handleOrder(item,indexs,1)">接单</u-button>
						<u-button size="medium" type="warning" v-if="item.refusePower==3"
							@click="handleOrder(item,indexs,2)">拒单</u-button>
					</view>

				</view>
				<view class="items box-shadow u-p-b-16" v-else
					:style="{'margin-bottom':index==list.length-1?'24rpx':''}">
					<view class="u-flex u-col-center u-row-between">
						<view class=" u-col-top" style="max-width: 78%;">
							<!-- <view class="u-line-1 u-font-32 fw-middel">{{item.beeperName}}</view> -->
							急救任务
						</view>
						<view class="u-text-right">
							<view class="u-font-md u-m-t-6 color-gary-xs">{{item.createDate}}</view>
						</view>
					</view>
					<view style="margin: 8rpx 0;">
						{{item.address}}
					</view>
					<view class="injuryLocationImg" v-if="item.siteUrl">
						<image style="width:100%;height:400rpx" :src="item.siteUrl || ''" mode="aspectFit" @click.stop="showBigimg(item.siteUrl)"></image>
					</view>
					<view class="u-flex u-col-center u-row-between"  v-if="item.jobType==0">
						<view class=" u-col-top" style="max-width: 50%;" @click.stop="getFloorList(item,index)">
							<view class="floor_input">
								{{item.floorVal?floorList[item.floorIndex[0]].label:'请选择楼层'}} <u-icon class="select_icon"
									name="arrow-down"></u-icon>
							</view>
						</view>
						<view class="u-text-right">
							<u-button class="u-margin-right-8" size="medium" type="success"
								@click="handleOrder(item,indexs,1)">接单</u-button>
							<!-- <u-button size="medium" type="warning" v-if="item.refusePower==3"
								@click="handleOrder(item,indexs,2)">拒单</u-button> -->
						</view>
					</view>

				</view>
			</navigator>
		</scroll-view>


		<view class="kong u-flex u-col-center u-row-center" v-else-if="userPinia.isLoginType==0">
			<u-empty mode="permission" text="登录后查看任务">
				<template #bottom>
					<button class="u-reset-button loginBtn" @click="tologin">登录</button>
				</template>
			</u-empty>
		</view>
		<block v-else>
			<view v-if="list.length===0" class="kong u-flex u-col-center u-row-center">
				<u-empty mode="order"></u-empty>
			</view>
		</block>
		<view class="work-status" @click="handleWorkState({type:$event.target.dataset.type,click:true})"
			v-if="userPinia.isLoginType!==0">
			<view v-if="workState==2" class="status-item" :data-type="1" style="color:#FEEEB2">
				点击上班
			</view>
			<block v-else>
				<view class="status-item" :data-type="workState==1?3:1">
					{{formatWorkStatus(workState==1?3:1).name}}
				</view>

				<view class="current-status">
					{{formatWorkStatus(workState).desc}}
				</view>
				<view class="status-item" :data-type="2">
					{{formatWorkStatus(2).name}}
				</view>
			</block>
		</view>

		<!-- 		<u-picker mode='time' :default-time="defalutTime" v-model='start_Time' :start-year="lastYear"
				:end-year="params.endDate.startsWith(lastYear)?lastYear:year" @confirm="startConfirm"></u-picker>
			<u-picker mode='time' :default-time="defalutTime" v-model='end_Time'
				:start-year="params.beginDate.startsWith(year)?year:lastYear" :end-year="year"
				@confirm="endConfirm"></u-picker>
			<u-mask :show="show" z-index="1" @click="show = false"></u-mask> -->

		<u-popup v-model="timeShow" mode="bottom" :safe-area-inset-bottom="true">
			<view class="time-select">
				<view class="time-top">
					<view @click="timeShow = false">
						取消
					</view>
					<input class="time-input" type="number" :value="time"
						@input="time = Number($event.detail.value)||''" placeholder="输入时间(分钟)" />
					<view style="color:#2979FF" @click="confirmTime">
						确定
					</view>
				</view>
				<view class="time-list">
					<view class="time-list__item" v-for="item in timeList" :key="item.value"
						@click="handleSelectTime(item)">
						<view class="label">
							{{item.label}}
						</view>
						<icon type="success" :color="item.selected?'':'#767676'"></icon>
					</view>
				</view>
			</view>
		</u-popup>


		<u-popup @close="floorShow = false" v-model="floorShow" mode="bottom" border-radius="14" length="50%">
			<view class="pickers">
				<view class="pickers_top">
					<view @click="cancelPicker">取消</view>
					<view>选择层</view>
					<view @click="confirmPicker">确定</view>
				</view>
				<picker-view :immediate-change="true" v-if="floorShow"
					style="width: 100%; height: 520rpx;text-align: center;" :indicator-style="indicatorStyle"
					:value="list[currentIndex].floorIndex" @change="confirmFloor">
					<picker-view-column>
						<view style="line-height: 60px;" v-for="(floors,s) in floorList" :key="s">{{floors.label}}
						</view>
					</picker-view-column>
				</picker-view>
			</view>


		</u-popup>

		<!-- </view> -->

		<tarBar></tarBar>
	</view>
</template>

<script setup lang="ts">
	import userSotre from '@/store/user';
	import * as userHooks from '@/hooks/user';
	import { computed, nextTick, onMounted, reactive, ref, unref } from "vue";
	import { onReachBottom, onPullDownRefresh, onShow, onLoad, onUnload } from '@dcloudio/uni-app'
	import taskApi from '@/api/task';
	import commonApi from '@/api/common';
	import waitersApi from "@/api/waiters"
	import indexEnum from '@/enum/index';
	// import * as hooksToo from '@/hooks/tool'
	import { getOptimizeDateTwo, compareDate, bindingBean, formatDateString } from "@/utils"
	const userPinia = userSotre()
	const workState = ref(2)

	let floorList = reactive([
	])
	const currentIndex = ref('')
	const timeShow = ref(false)
	const indicatorStyle = ref(`height: 60px `)
	const floorShow = ref(false)
	const timeList = reactive([
		{ value: 30, label: "30分钟", selected: false },
		{ value: 45, label: "45分钟", selected: false },
		{ value: 60, label: "1小时", selected: false },
		{ value: 120, label: "2小时", selected: false },
		{ value: -1, label: "不定", selected: true }
	])
	const taskNum = reactive({
		current: "",//当前任务
		connected: "",// 已接任务
		refuse: "",//拒绝任务
	})
	let time = "" // 临时选中的时间
	let restTimer = null // 休息定时器
	let workTimer = null // 上班或者下班定时器
	let refreshTimer = null // 刷新页面定时器
	let params = reactive({
		pageNo: 1,
		pageSize: 3,
		totalPage: 1,
		taskState: 3
	})
	const list = ref([])
	const refresh = ref(true)
	let scheduleList = []// 排班列表
	const getList = async (e) => {
		if(e==true) params.pageNo=1
		const { data } = await taskApi.getTaskList(params)
		list.value = params.pageNo == 1 ? data.list : list.value.concat(data.list)
		console.log(list.value)
		params.totalPage = data.totalPage
		list.value.forEach(item => {
			if(!Object.hasOwnProperty.call(item,'floorVal')){
				item.floorVal = ''
			}
			if(!Object.hasOwnProperty.call(item,'floorIndex')){
				item.floorIndex = [0]
			}
		})
		console.log(list,"list")
	}

	function tologin() {
		uni.navigateTo({
			url: '/subpackage/my/pages/login/login'
		})
	}

	// 工作状态改变
	const handleWorkState = async ({ type, durationTime, click }) => {

		if (click && !scheduleList.length) {
			// 手动点击,且没有排班表，可以提示去添加排班表
			const { confirm } = await uni.showModal({
				content: "当前无排班，是否新增排班"
			})
			if (confirm) {
				uni.navigateTo({
					url: "/subpackage/my/schedule/add"
				})
				return
			}

		}

		if (!type) return
		if (restTimer) clearTimeout(restTimer)
		if (type === 3 && !durationTime) {
			time = ""
			timeList.forEach(item => item.selected = false)
			timeShow.value = true
			return
		}

		// flag表示工作状态变为3休息，且时间不是不定
		const flag = type == 3 && durationTime !== -1
		const params = {
			workState: type,
			breakStartTime: flag ? formatDateString(new Date()) : "",
			breakDuration: flag ? durationTime : ""
		}
		await taskApi.setWorkState(params)
		workState.value = type
	}

	// 选择时间
	const handleSelectTime = (val) => {
		timeList.forEach(item => {
			if (item.value == val.value) {
				item.selected = !item.selected
			} else {
				item.selected = false
			}
		})
	}

	// 确认选中的时间
	const confirmTime = (val) => {
		workState.value = 3
		const target = timeList.find(item => item.selected)
		target && (time = target.value)
		if (!time) return uni.showToast({
			icon: "error",
			title: "输入或选择时间"
		})
		handleWorkState({ type: 3, durationTime: time })
		if (time !== -1) {
			// 如果休息时间不是不定的话，到时间就为上班，休息时间是不定就不自动上班
			restTimer = setTimeout(() => {
				handleWorkState({ type: 1 })
				restTimer = null
			}, time * 60 * 1000)
		}

		timeShow.value = false

	}
	const formatWorkStatus = (type) => {
		switch (type) {
			case 1:
				return {
					name: "上班",
					desc: "接单中"
				}
			case 2:
				return {
					name: "下班",
					desc: "停止接单"
				}
			case 3:
				return {
					name: "休息",
					desc: "暂停接单"
				}

		}
	}
	// params
	// 操作订单
	const handleOrder = async (item, index, state) => {
		let data = { orderId: item.orderId, state }
		if (item.orderType == 11) {
			if (!item.floorVal) {
				await uni.showModal({
					title: '提示',
					content: '当前为急救订单，请选择楼层'
				})
				return
			} else {
				data.floorId = item.floorVal
			}

		}
		const { confirm } = await uni.showModal({
			title: "提示",
			content: `确认${state == 2 ? '拒绝该订单' : '接单'}`
		})
		//  1是同意，2是拒绝，三是取消
		if (!confirm) return
		await taskApi.taskOperate(data)
		await uni.showToast({
			icon: 'success',
			title: state == 1 ? "接单成功，在订单列表可查看" : "拒绝成功"
		})
		init()
		if(item.orderType==11){
			uni.navigateTo({
				url:"/subpackage/order/rescueDetail?orderId=" + item.orderId
			})
		}
		// state==1?(taskNum.connected++):(taskNum.refuse++)
		// list.value.splice(index, 1)
		// taskNum.current = unref(list).length


	}

	/**
	 * 获取排班表的每个时间段
	 */
	const getFormatDate = (arr) => {
		return arr.map(item => item.list.map(item2 => item2.startTime + "/" + item2.endTime)).flat()
			.map(item => {
				const [startTime, endTime] = item.split("/").map(item2 => new Date(item2))
				return {
					startTime,
					endTime
				}
			})
	}
	//选择楼层
	const confirmFloor = (e) => {
		list.value[currentIndex.value].floorIndex = e.detail.value
		list.value[currentIndex.value].floorVal = floorList[e.detail.value[0]].value == '无' ? '' : floorList[e.detail.value[0]].value
	}

	//取消选择
	function cancelPicker() {
		floorShow.value = false
	}
	//确认选择
	function confirmPicker() {
		if(!list.value[currentIndex.value].floorVal){
			list.value[currentIndex.value].floorIndex = [0]
			list.value[currentIndex.value].floorVal = floorList[0].value
		}
		floorShow.value = false
	}

	//查看大图
	const showBigimg = (url) => {
		uni.previewImage({
			current: 0, //预览图片的下标
			urls: [url] //预览图片的地址，必须要数组形式，如果不是数组形式就转换成数组形式就可以
		})
	}

	//获取楼层
	const getFloorList = async (e,i) => {
		if(e.jobType!=0) return
		floorList = []
		currentIndex.value = i
		let res = await commonApi.getFloor({
			beeperId: e.beeperId
		})
		if (res.data != null && res.data != '') {

			res.data = res.data.map(item => {
				return {
					value: item.id,
					label: item.name
				}
			})
			floorList = res.data
			floorShow.value = true

		}
	}



	// 初始化
	const init = async (refsher = false) => {
		// isLoginType为0暂未登录
		if (userPinia.isLoginType == 0) return
		params.pageNo = 1
		// 获取列表
		await getList()
		// 获取信息
		const { data } = await taskApi.getTaskStatistics()
		const { workOffWay, breakEndTime } = data
		bindingBean(taskNum, data)
		workState.value = data.waiterWorkState
		// 获取排班表
		const res2 = await waitersApi.getScheduleInfo()
		scheduleList = res2.data || []
		// if(!(res2.data||[]).length){
		// 	// 不存在排班表，可以去添加新增
		// 	const {confirm} = await uni.showModal({
		// 		content:"当前无排班，是否新增排班"
		// 	})
		// 	if(confirm){
		// 		uni.navigateTo({
		// 			url:"/subpackage/my/schedule/add"
		// 		})
		// 		return
		// 	}
		// }
		const schedule = getFormatDate(scheduleList)
		if (schedule.length || workOffWay == 2) {
			/**
			 * schedule.length表示有排班表，可以自动上班，workOffWay表示设置了自动下班
			 * 如果是自动上班或者自动下班就开启一个每一秒运行一次的定时器判断是否上班或者下班
			 * 如果存在自动下班获取自动上班workTimer每一秒执行一次，监听是否上班还是下班
			 */
			clearInterval(workTimer)
			workTimer = setInterval(() => {
				const nowTime = new Date()
				// flag存在表示是上班时间内
				const flag = schedule.some(item => compareDate(nowTime, item.startTime) == 1 && compareDate(nowTime, item.endTime) == -1)
				if (flag && workState.value == 2 && schedule.length) {
					// 上班时间，当前状态是下班,且是自动上班，那么就改变状态，直接上班
					handleWorkState({ type: 1 })
				} else if (!flag && workState.value !== 2 && workOffWay == 2) {
					// 下班时间到了，当前状态不是下班，且是自动下班，改变状态直接下班
					handleWorkState({ type: 2 })
				}
			}, 1000)
		}

		const nowTime = new Date()
		if (workState.value == 3 && breakEndTime) {
			// 当前是休息时间，且有休息时间，不是不定
			const endStamp = new Date(breakEndTime).getTime()
			if (endStamp > nowTime)
				restTimer = setTimeout(() => {
					handleWorkState({ type: 1 })
					restTimer = null
				}, endStamp - nowTime)
		}


		// 这里需要定时如果到凌晨12点了就会刷新页面重新请求
		const nowYear = nowTime.getFullYear()
		const nowMonth = nowTime.getMonth()
		const nowDay = nowTime.getDate()
		const nowHours = nowTime.getHours()
		const nowMinutes = nowTime.getMinutes()
		const nowSeconds = nowTime.getSeconds()
		const refreshTime = new Date(nowYear, nowMonth, nowDay, 23, 59, 59)
		const timeStamp = refreshTime.getTime() - nowTime.getTime()
		if (timeStamp > 0) {
			// 晚上12点刷新
			refreshTimer = setTimeout(() => {
				init()
			}, timeStamp)
		}

		if (refsher) {
			refresh.value = false
			nextTick(() => {
				refresh.value = true
			})
		}

	}
	onLoad(() => {
		uni.$on("getWaiterSchedule", init)
		init()
	})

	onShow(() => {
		if (userPinia.isLoginType != 0) {
			getList(true)
		}
	})
	// 触底
	const handleReachBottom = async () => {
		const { pageNo, totalPage } = params
		if (pageNo >= totalPage) return
		params.pageNo++
		await getList()
		// uni.showToast({
		// 	title: '已刷新...'
		// })
		uni.stopPullDownRefresh()
	}
	// 刷新
	const handleRefresh = async () => {
		params.pageNo = 1
		init(true)
	}
	onReachBottom(async () => {

		// const { pageNo, totalPage } = params
		// if (pageNo >= totalPage) return
		// params.pageNo++
		// getList()

	})
	onPullDownRefresh(() => {
		if (userPinia.isLoginType != 0) {
			init()
			// params.pageNo = 1
			// list.value = []
			// getList()
		}

	})
	onUnload(() => {
		if (workTimer) clearTimeout(workTimer)
		if (restTimer) clearTimeout(restTimer)
		if (refreshTimer) clearTimeout(refreshTimer)
	})
</script>

<style lang="scss" scoped>
	::-webkit-scrollbar {
		display: none;
	}

	.container {
		display: flex;
		flex-direction: column;
		height: 100vh;
	}

	.color {
		color: #706f6f;
	}

	.top-wrapper {
		position: relative;
		overflow: hidden;
		height: 300rpx;
		box-sizing: border-box;
		padding: 10rpx 20rpx;
		width: 100%;

		&::after {
			content: '';
			width: 130%;
			height: 100%;
			position: absolute;
			left: -15%;
			// right:0;
			bottom: 0;
			margin: auto;
			border-bottom-left-radius: 50%;
			border-bottom-right-radius: 50%;
			background-color: $theme-bg-color;
			z-index: -1;
		}
	}

	.list {
		flex: 1;
		background-color: white;
		width: 93%;
		margin: -165rpx auto 20rpx auto;
		border-radius: 15upx;
		overflow-y: auto;

		&::-webkie-scrollbar {
			display: none;
			width: 0;
		}

		.items {
			background-color: white;
			margin: 24upx 24upx 0 24upx;
			border-radius: 15upx;
			padding: 18upx 24upx;

			.order-operation {
				justify-content: flex-end;

				:deep(.u-btn) {
					height: 58rpx;
					padding: 0 30rpx;
				}
			}

			.scroll {
				.item {
					width: 140upx;
					margin-right: 25upx;
				}
			}

			.floor_input {
				height: 60rpx;
				width: 240rpx;
				line-height: 60rpx;
				padding-left: 22rpx;
				border: 1px solid #666;
				border-radius: 10rpx;
				position: relative;

				.select_icon {
					position: absolute;
					right: 20rpx;
					top: 50%;
					transform: translateY(-50%);
				}
			}

		}
	}

	.work-status {
		display: flex;
		justify-content: space-around;
		border-radius: 40rpx;
		height: 90rpx;
		align-items: center;
		// line-height: 90rpx;
		font-size: 40rpx;
		width: 92vw;
		margin: 12rpx auto 28rpx auto;
		color: white;
		background-image: linear-gradient(to right, #515151, #28292B);

		.status-item {
			flex: 1;
			align-self: stretch;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.current-status {
			width: 120rpx;
			text-align: center;
			height: 120rpx;
			font-size: 32rpx;
			box-sizing: border-box;
			padding: 0 18rpx;
			font-weight: bold;
			line-height: auto;
			background-color: white;
			box-shadow: 0 0 20rpx rgba(20, 20, 20, .8);
			color: black;
			// transform: translateY(-15rpx);
			border-radius: 50%;
			display: flex;
			justify-content: space-around;
			align-items: center;
		}
	}

	.time-select {
		padding: 20rpx 20rpx;

		.time-top {
			display: flex;
			justify-content: space-between;
			align-items: center;

			input {
				margin: 0 20rpx;
				border-radius: 10rpx;
				height: 67rpx;
				line-height: 67rpx;
				flex: 1;
				padding: 0 20rpx;
				border: 1rpx solid #f5f5f5;
			}
		}

		.time-list {
			.time-list__item {
				display: flex;
				padding: 15rpx 0;
				justify-content: space-between;
			}
		}
	}

	.pickers {
		.pickers_top {
			width: 100%;
			height: 80rpx;
			line-height: 100rpx;
			display: flex;

			>view {
				flex: 1;
				font-size: 30rpx;
				text-align: center;
			}

			>view:first-child {
				color: #7f8c8d;
			}

			>view:nth-child(2) {
				font-size: 36rpx;
			}

			>view:last-child {
				color: #27ae60;
			}
		}
	}


	// .seleBottom {
	// 	// height: 0upx;
	// 	overflow: hidden;
	// 	transition: all .38s;
	// 	background-color: #f5f5f5;
	// 	// padding: 10upx 0 28upx;
	// 	border-radius: 0 0 28upx 28upx;

	// 	.items {
	// 		padding: 10upx 26upx;

	// 		.date-select {
	// 			display: flex;
	// 			align-items: center;

	// 			.date-type {
	// 				transform: translateY(2upx);
	// 				font-weight: normal;
	// 				margin-left: 20upx;
	// 			}
	// 		}

	// 		.title {
	// 			font-size: 32upx;
	// 			font-weight: 600;
	// 			padding-bottom: 18upx;
	// 		}

	// 		.gridBtn {
	// 			display: grid;
	// 			grid-template-columns: repeat(3, 1fr);
	// 			grid-column-gap: 24upx;
	// 			grid-row-gap: 18upx;

	// 			:deep(.u-size-default) {
	// 				line-height: 60upx !important;
	// 				font-size: 26upx;
	// 				height: 60upx !important;
	// 			}
	// 		}

	// 		.inputDate {
	// 			text-align: center;
	// 			background-color: #fff;
	// 			height: 2.3em;
	// 			border-radius: 26upx;
	// 			border: 1upx solid #c0c4cc;
	// 		}
	// 	}
	// }

	.kong {
		width: 100vw;
		flex: 1;
	}

	.loginBtn {
		background-image: linear-gradient(to top, #FEBF00, #FFCE05);
		line-height: 2.4em;
		width: 180upx;
	}

	.search {
		background-color: #ffc300;
		width: 100%;
		position: sticky;
		left: 0;
		top: 0;
		z-index: 10;

		.ri_btn {
			image {
				width: 40upx;
				height: 40upx;
			}

			text {
				font-size: 28upx;
				margin-left: 10upx;
			}
		}
	}

	.exp-time {
		font-weight: 900;
		color: red;
		font-size: 32rpx;
		display: inline-block;
		transform: translateY(3rpx)
	}

	.injuryLocationImg {}
</style>
